#pragma once
#ifndef ENTITYENEMY_H
#define ENTITYENEMY_H

#include "WorldEntity.h"
//#include "SimpleLinkedList.h"
#include "Vector2D.h"
class CRoute;

class CEntityEnemy : public CWorldEntity
{
private:
	int totalHealth;
	int timeSpawnLastProjectile;
	int timeBetweenProjectile;
	int timeToSpawn;
	int timeToLive;
	CRoute* route;

	int indexNextWayPoint;
	CVector2D vectorNextWayPoint;
	int projectileType;

public:
	CEntityEnemy(int currentPosX, int currentPosY, int indexSprite, int indexFrame, int speed, int health,
		int collisionCost, int timeToSpawn, int timeToLive, int projectileType, bool active);
	CEntityEnemy(void);
	~CEntityEnemy(void);

	void CEntityEnemy::update(void);
	void CEntityEnemy::render(void);
	void CEntityEnemy::die(void);
	void CEntityEnemy::goToTheNextWayPoint(void);
	bool CEntityEnemy::reachedDestination(void);
	void CEntityEnemy::initialiseDataForWayPoint(void);
	void CEntityEnemy::calculPosition(void);
	void CEntityEnemy::shootProjectile(void);
	void CEntityEnemy::leaveScreen(void);
	void CEntityEnemy::checkCollision(void);
	void CEntityEnemy::resetEnemy(void);

	int CEntityEnemy::getTotalHealth(void);

	void setTimeToSpawn(int timeToSpawn);
	void setTimeToLive(int timeToLive);
	void setRoute(CRoute* route);
	void setTimeBetweenProjectile(int timeBetweenProjectile);
	void setIndexNextWayPoint(int indexNextWayPoint);
};

#endif